#pragma once

#include <vsg/all.h>

namespace qbe::render {

struct Uniform {
  vsg::vec3 line_color;
  vsg::vec3 fill_color;
};

using Mat3 = vsg::mat3;

struct ShaderMaterial2D {
  Uniform uniform;
  vsg::Path vertexShader;
  vsg::Path fragmentShader;
};

struct PointUniform {
  vsg::vec4 color;
  int point_type;
  float point_size;
};

struct PointShaderMaterial2D {
  PointUniform uniform;
  vsg::Path vertexShader;
  vsg::Path fragmentShader;
};

struct LineUniform {
  vsg::vec4 color;
  vsg::vec2 canvas;
  float dash;
  float gap;
  bool isDash;
};

struct LineShaderMaterial2D {
  LineUniform uniform;
  vsg::Path vertexShader;
  vsg::Path fragmentShader;
};

struct FillUniform {
  vsg::vec4 color;
  bool useTexture;
  float width;
  float space;
  float line_width;
  float dot;
  float angle;
  float scale;
  float only_side;
  float use_point_grid;
  bool use_overlapping_discoloration;
};

struct FillShaderMaterial2D {
  FillUniform uniform;
  vsg::Path vertexShader;
  vsg::Path fragmentShader;
};

struct Material {};

struct BorderUniform {
  vsg::vec3 color;
  vsg::vec2 canvas;
  float dash;
  float gap;
  bool isDash;
};

struct BorderMaterial : public Material {
  BorderUniform ubo;
  vsg::Path vert_path;
  vsg::Path frag_path;
};

// struct FillUniform {
//   vsg::vec3 color;
//   float dash;
//   float gap;
// };
// struct FillMaterial : public Material {
//   FillUniform ubo;
//   vsg::Path vert_path;
//   vsg::Path frag_path;
// };

}  // namespace qbe::render